package ComposicaoProdutoCategoria;

import org.nakedobjects.extended.Entity;
import org.nakedobjects.object.AbstractNakedObject;
import org.nakedobjects.object.Title;
import org.nakedobjects.object.collection.ExtendedInternalCollection;
import org.nakedobjects.object.value.TextString;

@Entity
public class Produto extends AbstractNakedObject {

	private static final long serialVersionUID = 1L;

	private TextString nome = new TextString();
	
	private final ExtendedInternalCollection categorias = new ExtendedInternalCollection(
			"Categorias", Categoria.class, this);
	public ExtendedInternalCollection getCategorias() {
		return categorias;
	}

	public TextString getNome() {
		return nome;
	}

	public Title title() {
		return getNome().title();
	}

}
